package com.mjy.integrationtest.controller;

import com.mjy.integrationtest.manager.MessageManager;
import java.time.LocalDateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MessageController {

    @Autowired
    private MessageManager messageManager;

    @GetMapping("/hello")
    public String hello() {
        return "Hello," + LocalDateTime.now().toString();
    }

    @PostMapping("/sendMessage")
    public String send() {
        messageManager.send();

        return "ok";
    }


}
